# 练习案例：累加和案例,传一个参数，则为end，传两个值，分别是start和end
# a = 1
# b = 2
# a, b = b, a


# def cal(start, end=None):  # 形式参数
#
#     if end is None:
#         start, end = 1, start
#
#         # 计算1-n的累加和
#     ret = 0
#     for i in range(start, end + 1):
#         ret += i
#     print(ret)
#
#
# cal(1, 100)
# cal(100)
